/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: Universidad de Almeria
 * License Type: Purchased
 */
package foroindaltronia.bd;

import java.util.List;
import org.orm.PersistentException;
import org.orm.PersistentSession;
import org.orm.criteria.*;

public class TemaDetachedCriteria extends AbstractORMDetachedCriteria {
	public final StringExpression nombre;
	public final DateExpression fechaCreacion;
	public final IntegerExpression ID;
	
	public TemaDetachedCriteria() throws PersistentException {
		super("ForoIndaltronia.BD.Tema", foroindaltronia.bd.TemaCriteria.class);
		nombre = new StringExpression("nombre", this.getDetachedCriteria());
		fechaCreacion = new DateExpression("fechaCreacion", this.getDetachedCriteria());
		ID = new IntegerExpression("ID", this.getDetachedCriteria());
	}
	
	public foroindaltronia.bd.ModeradorCriteria createGestionadoCriteria(PersistentSession session) {
		return new foroindaltronia.bd.ModeradorCriteria(super.createExecutableCriteria(session).createCriteria("gestionado"));
	}
	
	public foroindaltronia.bd.UsuarioCriteria createCreado_porCriteria(PersistentSession session) {
		return new foroindaltronia.bd.UsuarioCriteria(super.createExecutableCriteria(session).createCriteria("creado_por"));
	}
	
	public Tema uniqueTema(PersistentSession session) {
		return (Tema) super.createExecutableCriteria(session).uniqueResult();
	}
	
	public Tema[] listTema(PersistentSession session) {
		List list = super.createExecutableCriteria(session).list();
		return (Tema[]) list.toArray(new Tema[list.size()]);
	}
}

